<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="ShowDepartments.aspx.cs" Inherits="MB.TheBeerHouse.UI.ShowDepartments" Title="Online Shopping MALL - Store Departments" %>
<%@ MasterType VirtualPath="~/Template.master" %>

<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" Runat="Server">
    <h2><span style="font-family: 'Arial Black'"><a href="SearchPage.aspx">
       <span style="color: black; font-size: large;">Search our collection of books</span></a></span><span 
           
        style="text-decoration: underline; font-family: 'Arial Black'; color: #FF0000; font-size: large;"> 
        and CDs</span></h2>
   <div class="sectiontitle">Store Department</div>
   <p></p>
   Click on the title of the department for which you want to browse the 
products:
   <asp:DataList ID="dlstDepartments"  runat="server" 
      DataSourceID="objAllDepartments" DataKeyField="ID"
      GridLines="Both" Width="100%" RepeatColumns="2" BackColor="#DEBA84" 
    BorderColor="#DEBA84" BorderStyle="None" BorderWidth="3px" CellPadding="3" 
    CellSpacing="3" onselectedindexchanged="dlstDepartments_SelectedIndexChanged">
       <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
      <ItemTemplate>
         <table cellpadding="6" style="width: 100%;">
            <tr>
               <td style="width: 1px;">
               <asp:HyperLink runat="server" ID="lnkDepImage" NavigateUrl='<%# "BrowseProducts.aspx?DepID=" + Eval("ID") %>' >
                  <asp:Image runat="server" ID="imgDepartment" BorderWidth="0px" 
                     AlternateText='<%# Eval("Title") %>' ImageUrl='<%# Eval("ImageUrl") %>' />
               </asp:HyperLink>
               </td>
               <td>
                  <div class="sectionsubtitle">

                  <asp:HyperLink runat="server" ID="lnkDepTitle"
                     Text='<%# Eval("Title") %>'
                     NavigateUrl='<%# "BrowseProducts.aspx?DepID=" + Eval("ID") %>' />
                  </div>
                  <br />
                  <asp:Literal runat="server" ID="lblDescription" Text='<%# Eval("Description") %>' />
               </td>
            </tr>
         </table>
      </ItemTemplate>
       <ItemStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
       <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
       <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
   </asp:DataList>
   
   <asp:ObjectDataSource ID="objAllDepartments" runat="server" SelectMethod="GetDepartments"
      TypeName="MB.TheBeerHouse.BLL.Store.Department">
   </asp:ObjectDataSource>
</asp:Content>

